﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace DemoStock.Common
{
    public class MyCommand : ICommand
    {
        public event EventHandler CanExecuteChanged;
        public Func<object, bool> funcExecute;
        public Action<object> actExecute;
        public bool CanExecute(object parameter)
        {
            return funcExecute.Invoke(parameter);
        }

        public void Execute(object parameter)
        {
            actExecute?.Invoke(parameter);
        }
    }
}
